package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.Member;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface MemberMapper extends BaseMapper<Member> {
    @Select("select COUNT(1) from t_member where REGTIME between #{begin} and #{end}")
    Integer findMemberCounts(@Param("begin") String begin,@Param("end") String end);

    @Select("select sex name,COUNT(1) value from t_member where REGTIME between #{begin} and #{end} group by sex ")
    List<Map> getMemberCountWithSex(@Param("begin") String begin,@Param("end") String end);

    @Select("select IDCARD from t_member where REGTIME between #{begin} and #{end}")
    List<String> getMemberIdcard(@Param("begin") String begin,@Param("end") String end);
}
